<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body></body>
    <script>
        class Vue {
            constructor(el) {}
            create(content) {
                console.log('beforeCreatd')
                this.content = content
                console.log('created')
            }
            mount() {
                console.log('beforMount')
                const el = document.createElement('div')
                el.style = `background:red;height:30px;`
                document.body.insertAdjacentElement('beforeend', el)
                console.log('mounted')
            }
        }

        const vue = new Vue()
        vue.create()
        vue.mount()

        console.log('beforUnmount')
        document.querySelector('div').remove()
        vue = null
        console.log('unmount')
    </script>
</html>
